package com.demo.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ApiModel("员工表")
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("员工账号")
    private String username;

    @ApiModelProperty("员工姓名")
    private String name;

    @ApiModelProperty("员工密码")
    private String password;

    @ApiModelProperty("员工手机号")
    private String phone;

    @ApiModelProperty("员工性别")
    private String sex;

    @ApiModelProperty("员工身份证号")
    private String idNumber;

    @ApiModelProperty("账号状态")
    private Integer status;

    //在新增时自动填充该字段
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    //在新增与修改时自动填充该字段
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    //在新增时自动填充该字段
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;
    //在新增与修改时自动填充该字段
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

}
